package com.mk.web.service.impl;

import java.util.List;

import com.mk.web.mapper.PeopleMapper;
import com.mk.web.model.People;
import com.mk.web.service.PeopleService;

/**
 * Created by WangChen on 2018/11/28 18:15.
 */
public class PeopleServiceImpl implements PeopleService {

    /**
     * 调用set方法, 让spring自动注入peopleMapper
     */
    private PeopleMapper peopleMapper;

    @Override
    public List<People> findByName(String name) {
        return peopleMapper.selectByName(name);
    }

    public PeopleMapper getPeopleMapper() {
        return peopleMapper;
    }

    public void setPeopleMapper(PeopleMapper peopleMapper) {
        this.peopleMapper = peopleMapper;
    }
}
